From ab488e380243c5a4c17d022d6725b3ef5da601af Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Wed, 26 Jul 2006 11:10:26 +0100 Subject: [PATCH] [SVM] Correct compile time compare of CONFIG_PAGING_LEVELS for 64bit and 32bit PAE guests. This code affects accesses to the CR4 register by the SVM guest. Signed-off-by: Tom Woller --- xen/arch/x86/hvm/svm/svm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 0fc10b0715..998611220e 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -1766,7 +1766,7 @@ static int mov_to_cr(int gpreg, int cr, struct cpu_user_regs *regs) if ( svm_pgbit_test(v) ) { /* The guest is a 32-bit PAE guest. */ -#if CONFIG_PAGING_LEVELS >= 4 +#if CONFIG_PAGING_LEVELS >= 3 unsigned long mfn, old_base_mfn; if( !shadow_set_guest_paging_levels(v->domain, PAGING_L3) ) @@ -1810,7 +1810,7 @@ static int mov_to_cr(int gpreg, int cr, struct cpu_user_regs *regs) else { /* The guest is a 64 bit or 32-bit PAE guest. */ -#if CONFIG_PAGING_LEVELS >= 4 +#if CONFIG_PAGING_LEVELS >= 3 if ( (v->domain->arch.ops != NULL) && v->domain->arch.ops->guest_paging_levels == PAGING_L2) { -- 2.30.2